<?php
namespace backend\controllers;
use backend\models\Log;
use yii\data\ActiveDataProvider;

/**
 * User: Drery
 * Date: 2016/3/2
 * Time: 18:22
 */
class LogController extends InitController
{
    public function actionIndex()
    {
        $dataProvider = new ActiveDataProvider([
            'query' => Log::find()->orderBy(['id'=>SORT_DESC]),
            'pagination' => [
                'pageSize' => 50
            ],
            'sort' => false
        ]);
        return $this->render('index',[
            'dataProvider' => $dataProvider
        ]);
    }
}